home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / networking / 3194 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  5.9 KB

  1. Path: comma.rhein.de!serpens!not-for-mail
  2. From: mlelstv@serpens.rhein.de (Michael van Elst)
  3. Newsgroups: comp.sys.amiga.networking
  4. Subject: Re: Announce: AWeb 1.0 released!
  5. Date: 29 Mar 1996 19:13:26 +0100
  6. Organization: dis-
  7. Message-ID: <4jh986$a5o@serpens.rhein.de>
  8. References: <4iva78$5pa@news.xs4all.nl> <4j1f6e$984@news.uni-c.dk> <jasonb.827822336@cs.uwa.edu.au> <4j8o6r$9vj@serpens.rhein.de> <jasonb.827896888@cs.uwa.edu.au> <4jaue8$jh4@serpens.rhein.de> <jasonb.827996764@cs.uwa.edu.au> <4je3qj$kk@serpens.rhein.de> <jasonb.828076494@cs.uwa.edu.au> <4jgdfr$8f4@serpens.rhein.de> <jasonb.828104646@cs.uwa.edu.au>
  9. NNTP-Posting-Host: serpens.rhein.de
  10.  
  11. jasonb@cs.uwa.edu.au (Jason S Birch) writes:
  12.  
  13. >Thanks to Exec's scheduler, you can *if running at a high enough
  14. >priority*. Priority 0 is plenty high enough if CPU intensive stuff is
  15. >lower.
  16.  
  17. That's the key. CPU intensive stuff is _not_ lower. You don't want
  18. to manually change the priorities and you do not want every program
  19. to change its own priorities.
  20.  
  21. >*And*, most importantly, their priority.
  22.  
  23. The default priority of a process is zero.
  24.  
  25. >>It is much simpler to provide timely feedback if the user interface
  26. >>runs at a higher priority. 
  27.  
  28. >Bingo.
  29.  
  30. So provide timely feedback as AmigaOS did it all the time: by using
  31. input.device. It exists, it is the standard, it works well, you don't
  32. need a scheduler that outguesses a programs intention.
  33.  
  34. >Another one is wanting to have a uniform notification scheme which can
  35. >work uniformly on any attribute of any object. Running your GUI event
  36. >handling code on two separate tasks, one at pri 20 and one at the usual
  37. >pri, would make this very messy.
  38.  
  39. This isn't more difficult than other code that needs several tasks.
  40. And if you use MUI you have to do the same. Wether your code spawns
  41. that process or you use the existing input.device process.
  42.  
  43. >So MUI does it all on the usual
  44. >priority task's context, which makes MUI simpler but means the
  45. >programmer has to be aware of the issues of GUI responsiveness and
  46. >ensure his event handling loop is always ready and waiting.
  47.  
  48. Which is more difficult and interferes with more programs than simple
  49. semaphore locking of data structures.
  50.  
  51. >It also
  52. >means it's more uniform -- as has been noted before, not even GadTools
  53. >does *all* it's GUI response at pri 20 -- some gadgets are refreshed by
  54. >input.device, some aren't.
  55.  
  56. No. It is maybe not perfect, but it does what you want: offload
  57. expensive operations to the user process while providing immediate
  58. feedback at high priority.
  59.  
  60. >You even have some things -- like the
  61. >AmigaGuide datatype laying out AmigaGuide documents -- running at pri
  62. >20 when they really shouldn't be.
  63.  
  64. Sure. I never said that existing BOOPSI gadgets are perfect but
  65. datatypes already provide a method to offload expensive operations.
  66. This is a function of the datatypes.library.
  67.  
  68. Generic BOOPSI doesn't have this (mainly because these are simple
  69. gadgets with quick methods) but you can do this on your own.
  70.  
  71. >Or, to put it another way -- you can lower the priority of tasks not
  72. >directly communicating with the user.
  73.  
  74. Again. That is something YOU have to do.
  75.  
  76. >Executive simply tries to do this automatically. That's all.
  77.  
  78. And Executive has its own problems....
  79.  
  80. >>Usuability of the user interfaces and
  81. >>other real-time tasks now becomes the policy of individual programs
  82. >>and their programmers.
  83.  
  84. >Only if they don't separate event handling from CPU intensive code
  85.  
  86. Think about programs that do not do event handling. Something simple
  87. as a compiler or anything written in straight ANSI C.
  88.  
  89. >>With the standard Exec scheduler you can even allow it to run on
  90. >>the same priority. 
  91.  
  92. >But what do you gain from doing so?
  93.  
  94. You do not need to write special code to keep MUI and Executive happy.
  95. That's what it is.
  96.  
  97. >Of course they don't. I'm not talking about changing AWeb so it won't
  98. >"interfere" with MUI --
  99.  
  100. Run a MUI program. Run another CPU-intensive program at the same
  101. priority (i.e. 0: the default priority). Watch the MUI program to
  102. become sluggish (if it isn't already).
  103.  
  104. >I'm talking about making AWeb *itself* more
  105. >responsive,
  106.  
  107. AWeb is responsive. If you run Executive at the same time it isn't.
  108.  
  109. >In case it isn't obvious -- in order for a MUI program to remain
  110. >responsive, all that's required is that no CPU intensive tasks be
  111. >competing with it for the CPU at the same priority.
  112.  
  113. So none of the standard programs is allowed to run, because these
  114. programs surely do not change task priorities to keep MUI happy.
  115.  
  116. >Of course it doesn't. Over a long period of time they get the same
  117. >amount of CPU (all else being equal), but in one second they can get
  118. >vastly different amounts.
  119.  
  120. Which means that it is pretty unusuable.
  121.  
  122. >get one seconds' worth of CPU, but they would've got it in bursts of
  123. >about 0.05 seconds at a time.
  124.  
  125. And that's what we want to create the illusion of concurrency:
  126. multitasking.
  127.  
  128. >I would make an entry for them in Executive's preferences.
  129.  
  130. So another thing the user has to change to keep Executive happy.
  131.  
  132. >As I said, nothing I've said has anything to do with "making MUI
  133. >happy".
  134.  
  135. Sure. To make MUI happy you have to run CPU intensive processes
  136. at priorities below 0.
  137.  
  138. >Given he's already spawned off network transferring and image decoding
  139. >onto subtasks, is it really such a terrible thing to want page layout
  140. >there as well?
  141.  
  142. If page layout is fast enough there is no need for just another task.
  143. I can also imagine that page layout is partially locked with the input
  144. because you change the window gadgets.
  145.  
  146. Anyway, this is not a problem unless Executive tries to outguess the
  147. programs.
  148.  
  149. >>Yes. And no, I do not run Executive anymore.
  150.  
  151. >Well, even before I ran Executive, I always set priorities manually to
  152. >ensure processes like my editor ran higher than processes like Real3D.
  153.  
  154. If you work in a shell, do you set the priorities for every command
  155. you start ?
  156.  
  157.  
  158. -- 
  159.                                 Michael van Elst
  160.  
  161. Internet: mlelstv@serpens.rhein.de
  162.                                 "A potential Snark may lurk in every tree."
  163.